load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/canister_client",
    "//rs/crypto/for_verification_only",
    "//rs/crypto/node_key_generation",
    "//rs/crypto/utils/threshold_sig_der",
    "//rs/interfaces",
    "//rs/interfaces/registry",
    "//rs/protobuf",
    "//rs/registry/client",
    "//rs/registry/helpers",
    "//rs/registry/keys",
    "//rs/registry/nns_data_provider",
    "//rs/types/base_types",
    "//rs/types/types",
    "@crate_index//:clap",
    "@crate_index//:hex",
    "@crate_index//:prost",
    "@crate_index//:serde",
    "@crate_index//:tempfile",
    "@crate_index//:tokio",
    "@crate_index//:url",
]

rust_library(
    name = "cup_explorer",
    srcs = glob(["src/**"]),
    compile_data = ["ic_public_key.pem"],
    crate_name = "ic_cup_explorer",
    version = "0.9.0",
    deps = DEPENDENCIES,
)

rust_binary(
    name = "cup_explorer_bin",
    srcs = glob(["src/**"]),
    deps = DEPENDENCIES + [":cup_explorer"],
)
